home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol A-4 / (Vol A-4) Vol. A4.iso / Games / smashing.swf / scripts / DefineSprite_197 / frame_2 / DoAction.as
Encoding:
Text File  |  2008-03-12  |  788 b   |  38 lines

  1. if(strPassword != txtPassword)
  2. {
  3.    _root.typingPassword = true;
  4. }
  5. else
  6. {
  7.    typingCounter++;
  8.    if(100 < typingCounter)
  9.    {
  10.       _root.typingPassword = false;
  11.       typingCounter = 0;
  12.    }
  13. }
  14. strPassword = txtPassword;
  15. strPassword = strPassword.toUpperCase();
  16. i = 0;
  17. while(_parent._parent.arrLevelCode.length >= i)
  18. {
  19.    if(strPassword == _parent._parent.arrLevelCode[i])
  20.    {
  21.       _parent._parent.currentLevel = i + 1;
  22.       passwordRGB = new Color(this);
  23.       passwordRGB.setRGB(39423);
  24.       break;
  25.    }
  26.    _parent._parent.currentLevel = 1;
  27.    passwordRGB = new Color(this);
  28.    passwordRGB.setRGB(0);
  29.    i++;
  30. }
  31. txtPassword = strPassword;
  32. if(Key.isDown(13))
  33. {
  34.    _parent.destination = "game";
  35.    _parent.play();
  36. }
  37. gotoAndPlay(_currentframe - 1);
  38.